Skip to content

chore: deploy the docs to Cloudflare Workers - #9

Open
mukezhz wants to merge 2 commits into
mainfrom
chore/deploy-docs
Open

mukezhz wants to merge 2 commits into
mainfrom
chore/deploy-docs

Conversation

@mukezhz

@mukezhz mukezhz commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Problem

The docs site had no deployment. GitHub Pages builds through Actions, and Actions is blocked by the account's billing lock.

Solution

The docs are deployed as Cloudflare Workers static assets, straight from a local machine. They're live at https://codemode-docs.itnoobz.workers.dev.

  • docs/wrangler.jsonc: a static-assets-only Worker with no script.
    • html_handling: auto-trailing-slash serves VitePress cleanUrls pages, so /quickstart returns quickstart.html.
    • not_found_handling: 404-page uses the site's own 404 page.
  • Dependencies: Wrangler 4.162.0 is a docs devDependency, so the version is pinned in the lockfile. workerd's install script is allowed in pnpm-workspace.yaml, which pnpm 11 requires.
  • Commands: pnpm --dir docs run deploy (or make docs-deploy) builds the site and deploys it.
  • Account: it comes from the Wrangler login, or from CLOUDFLARE_ACCOUNT_ID when the login reaches more than one account. No account ID is committed.
  • Docs: README and AGENTS.md document the command, and the README links the live site.

Verification

  • wrangler deploy --dry-run read 172 files and found no bindings.
  • wrangler dev locally: /, /quickstart, /approval and /observability returned 200, /quickstart.html redirected (307) to /quickstart, and /nope returned the site's 404.
  • Deployed version 5766f75f. The same routes, plus /sources and /types, gave the same results on the live site, and the stylesheet loads.
  • CI cannot run until the billing lock is cleared. The docs job's pnpm install --frozen-lockfile uses the updated lockfile.

docs/wrangler.jsonc serves the VitePress build as Workers static assets
with no Worker script: cleanUrls pages through auto-trailing-slash and
the site's own 404 page. Wrangler is a docs devDependency, workerd's
install script is allowed, and make docs-deploy builds and deploys.
The account comes from the login, or from CLOUDFLARE_ACCOUNT_ID, so no
account ID is committed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant